package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleCommentDto;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.article.vos.ArticleCommnetVo;
import com.heima.model.search.vos.SearchArticleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 文章信息表，存储已发布的文章 Mapper 接口
 * </p>
 *
 * @author itheima
 */
@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    List<ApArticle> loadAll(@Param("homeDto") ArticleHomeDto articleHomeDto,@Param("status") Integer status);
    List<SearchArticleVo> loadAllES();
    SearchArticleVo loadToES(Long articleId);
    List<ArticleCommnetVo> findCommentByPage(@Param("dto") ArticleCommentDto dto);


    public List<ApArticle> findArticleListByLast5days(@Param("dayParam") Date dayParam);




}
